#ifndef _PARSE_H_
#define _PARSE_H_

#include "ysh.h"

typedef struct CommandLine {
    char raw_string[LINE_BUF_SIZE];
    int raw_string_len;

    char parsed_cmdline[PIPE_NUM][PROG_ARGS_NUM][STRING_SIZE];
    int pipe_num;
    int prog_args_num[PROG_ARGS_NUM];

    Bool in_redirect;
    char in_redirect_path[PATH_LEN];
    Bool out_redirect;
    char out_redirect_path[PATH_LEN];

    Bool run_in_bg;
    Bool is_valid;
} CommandLine;

extern CommandLine current_cmdline;

extern void cat_to_raw(char *s, int size);
extern void parse(void);

#endif

